
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/custom-html.tld" prefix="chtml" %>

<%@ page import="com.erp.framework.util.CommonUtil"%>
<%@ page import="com.erp.app.common.ProjectConstants"%>
<%@ page import="com.erp.app.catalog.login.web.CategoryItemCategoryRow"%>
<%@ page import="com.erp.app.catalog.login.web.CategoryItemClassRow"%>
<%@ page import="com.erp.app.catalog.login.web.CatalogLoginAction"%>

<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.Hashtable"%>
<%@ page import="java.util.HashMap"%>
<%@ page import="java.util.Iterator"%>

<jsp:useBean id="catalogLoginForm" scope="session" type="com.erp.app.catalog.login.web.CatalogLoginForm" />

<meta http-equiv="Content-Type" content="text/html; charset=big5">
<link rel="stylesheet" href="stylesheet/style1.css" type="text/css">
<link href="<%= request.getContextPath()%>/css/catalogCss/global.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath()%>/css/catalogCss/buttons.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath()%>/css/catalogCss/forms.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath()%>/css/catalogCss/tables.css" rel="stylesheet" type="text/css" />

		<div id="results_nav">
			<div id="results_nav_right">
				<div id="page_jumps">
				<%ArrayList itemMasterVos = catalogLoginForm.getItemMasterVos();%>
					<p>
						<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryDisplaying"/>
					<% if ((catalogLoginForm.getSidx()+CatalogLoginAction.MAX_SHOW_PAGE)>itemMasterVos.size()){ %>
						<%=itemMasterVos.size()-catalogLoginForm.getSidx()%>
					<%}else{%>
						<%=CatalogLoginAction.MAX_SHOW_PAGE%>
					<%}%> 
						<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryOf"/>
					<%=itemMasterVos.size()%> 
						<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryResult"/>.
					</p>
				</div>
				<div id="btn_rounded_rectangle" class="left">
					<ul>
						<li>
							<a <%=(catalogLoginForm.getSidx()==0?"disabled":" ")%> onclick="javascript:doSubmit('<%=CatalogLoginAction.ACTION_SCROLL_LEFT%>','<%=catalogLoginForm.getSidx()%>');"	href="#">
								<span>&nbsp;&laquo;&nbsp;</span></a></li>
					</ul>
				</div>
				<div id="page_jumps"><p>
				  <% for(int j=0; j<catalogLoginForm.getTtlPage(); j++){%>
					<a onclick="javascript:doSubmit('<%=CatalogLoginAction.ACTION_TO_PAGE%>','<%=j%>');" href="#">		<%=j+1%></a>
				  <%}%>
				</p></div>
				<div id="btn_rounded_rectangle" class="left">
					<ul>
						<li>
							<a <%=((catalogLoginForm.getSidx()+CatalogLoginAction.MAX_SHOW_PAGE)>itemMasterVos.size()?"disabled":" ")%> onclick="javascript:doSubmit('<%=CatalogLoginAction.ACTION_SCROLL_RIGHT%>','<%=catalogLoginForm.getSidx()%>');" href="#">
								<span>&nbsp;&raquo;&nbsp;</span>
							</a>
						</li>
					</ul>
				</div>
			</div>
			<div id="results_nav_left">
				<div id="btn_rounded">
					<ul>
						<li>
							<a onclick="javascript:doSubmit('<%=CatalogLoginAction.ACTION_CHANGE_RESULT_VIEW%>','<%=CatalogLoginAction.SHOW_ITEM_LIST_VIEW%>');" href = "#">
								<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryList"/>								
							</a>
						</li>									
						<li>
							<a onclick="javascript:doSubmit('<%=CatalogLoginAction.ACTION_CHANGE_RESULT_VIEW%>','<%=CatalogLoginAction.SHOW_ITEM_DETAIL_VIEW%>');"
							href = "#">
								<html:text useExtensions="true" uiType="label" childTsIndex="current" name="catalogLoginForm" property="lblCategoryDetail"/>								
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>

		<logic:equal name="catalogLoginForm" property="showType" value="<%=CatalogLoginAction.SHOW_ITEM_LIST_VIEW%>">
			<jsp:include page="/jsp/com/erp/app/catalog/itemSearch/itemResultListView.jsp" flush="true"/>
		</logic:equal>
		<logic:equal name="catalogLoginForm" property="showType" value="<%=CatalogLoginAction.SHOW_ITEM_DETAIL_VIEW%>">
			<jsp:include page="/jsp/com/erp/app/catalog/itemSearch/itemResultDetailView.jsp" flush="true"/>
		</logic:equal>

<html:hidden property="showType"/>
<html:hidden property="sidx"/>
<html:hidden property="ttlPage"/>
